home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: genew@mindlink.bc.ca (Gene Wirchenko)
- Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
- Subject: Re: C or C++ for a 14-year old?
- Date: Tue, 09 Jan 1996 06:15:33 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Message-ID: <4ct1e5$kpc@fountain.mindlink.net>
- References: <4b30ld$lp2$1@mhafc.production.compuserve.com> <w31V7MD4ED1aLz3@dexam.another.gun.de> <dschrage.23.152EBB70@indirect.com> <4cq6cr$t51@dub-news-svc-1.compuserve.com> <4cqhu3$1quo@news.gate.net> <qq4tu6nr5t.fsf@tartarus.ucsd.edu>
- NNTP-Posting-Host: line066.nwm.mindlink.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- djohnson@tartarus.ucsd.edu (Darin Johnson) wrote:
-
- >bhutto@gate.net (William Hutto) writes:
- >> 10 FOR I=1 TO 10
- >> 20 PRINT "YOUR NAME HERE"
- >> 30 NEXT I
- >> 40 END
- >>
- >> RUN
-
- >That's much of the problem with BASIC. More modern BASIC's are
- >better than this, why go back to the 70's way of doing things?
- >You don't need a label on every line. It just makes things
- >harder (renumber is a kluge to get around a bad feature).
-
- >What about
-
- > For I=1 to 10
- > print "your name here"
- > next i
- > end
-
- Indenting has become popular since the seventies, too.
-
- >With no labels. Or better yet, forget the wierd for statment
- >(that was very hard for me to grasp when I first saw it, because
- >first I kept trying to fit the English meaning of the words into
- >place, and second, it wasn't explained that this was just a shortcut
- >for a while statement)
-
- for i=1 to 10 ::= for the cases of i from 1 to 10. English fits
- just fine.
-
- >Personally, I think it's just as easy for a beginner to understand
-
- > i = 1
- > while i <= 10
- > print "your name here"
- > done
-
- >Not only is it easy to understand, you start to see statements in
-
- It's easy? Well, then it's a pity you got it wrong. Try
- incrementing i in your loop. Of course, a for-next loop handles that
- for you.
-
- >terms of groups of statements, not a sequential list. You start
- >to see programs as a hierarchical structure, not a flowchart.
- >And when you get to BASIC programs of over 50 lines, things get
- >ugly *fast*. Why should the beginner struggle deciphering a few
- >pages of BASIC code, when they could breeze through the same amount
- >if it were written in a Pascal like language?
-
- Modern BASICs are very Pascal-like. Remember, this isn't the
- seventies. Oh, yeah. Which language requires you to declare labels
- which can only be numeric? Gimme a "p", gimme...
-
- >[C program removed]
- >> This *program* requires considerably more explanation. Also, if this
- >> is not a C *interpreter* the student needs to know something about compilation
- >> and may even need to know about files and linking.
-
- >Yes, C isn't so great for the beginner. Elementary Pascal programs
- >aren't so bad. There's a little preamble, but simpler than C, and
- >far fewer "just do it that way, I'll explain later".
-
- >> The ultimate *destination* might be a commonly used/accepted language.
- >> I went from BASIC to 6502 assembly language, 8086 assembly language, C, C++
- >> and then Pascal. When I got to Pascal I thought, "Oops, wrong way!"
- >> I almost wanted to say, start with assembler.
-
- >First thing I did was Cardiac - a cardboard instructional aid to
-
- CARDIAC: "CARDboard Illustrative Aid to Computing". Me too! I'd
- like to find one of the kits. If anyone knows, please let me know.
- Did you ever figure out how to boot a program using CARDIAC? It took
- me years to figure it out.
-
- >computers (yeah right, no one had computers back then, at least no in
- >hick towns). Then something that had relays and such, looking a lot
- >like a sturdy version of the radioshack electronics kits. Then I got
- >access to a real computer, and did a bit of assembler. Then I looked
- >over at the TSR machine next to the Altair and said, hey, that's a lot
-
- TRS-80. An IBM pc is a TSR machine <g>.
-
- >simpler, and I don't have to punch in a bunch of bootup code either
- >:-) Then I did a bunch of basic, hurting my head trying to decipher
- >the long programs.
-
- >Then I saw Pascal in college, and for the first time, I related
- >programs to math, and things were elegant, not a jumble of code.
- >Things were abstract, not tied to the nuts and bolts of the machine.
- >It was just so vastly different from the way I had looked at things
- >before. You could actually write huge programs and be able to
- >understand it for once. So maybe, there's still a little bit of me
- >that thinks the beginner should do things the hard way, just to get a
- >better appreciation of high level languages (and then I wise up and
- >realize that the lesson would be lost on 90% of the them).
- >--
- >Darin Johnson
- >djohnson@ucsd.edu -- Strange things are afoot at the circle-K...
-
- Sincerely,
-
- Gene Wirchenko
-
- C Pronunciation Guide:
- y=x++; "wye equals ex plus plus semicolon"
- x=x++; "ex equals ex doublecross semicolon"
-
-